package edu.scut.course_management.po;

/** 
* 持久化对象：专业
* @author thompson
*/
public class Major {
    private Integer departmentId;
    private Integer majorId;
    private String majorName;

    public Integer getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    public Integer getMajorId() {
        return majorId;
    }

    public void setMajorId(Integer majorId) {
        this.majorId = majorId;
    }

    public String getMajorName() {
        return majorName;
    }

    public void setMajorName(String majorName) {
        this.majorName = majorName;
    }

    @Override
    public String toString() {
        return "Major {" + 
               "departmentId=" + departmentId + 
               ", majorId=" + majorId + 
               ", majorName=" + majorName + 
               "}";
    }

    @Override
    public boolean equals(Object obj){
        if(!(obj instanceof Major)){
            return false;
        }
        else{
            return departmentId.equals(((Major)obj).getDepartmentId())&&
                   majorId.equals(((Major)obj).getMajorId())&&
                   majorName.equals(((Major)obj).getMajorName());
        }
    }

    
}